# 评论流程类
from time import sleep
from pages.client_page.comment_page import CommentPage

class CommentLogic():

    # 评论流程
    def comment(self, driver):
        # 1. 点击评价按钮
        driver.find_element(*CommentPage.comment).click()
        sleep(3)
        # 2. 再点击评价按钮
        driver.find_element(*CommentPage.comment_order).click()
        sleep(3)
        # 3. 评价商品描述评价
        driver.find_elements(*CommentPage.order_description)[0].click()
        # 4. 评价客服服务质量
        driver.find_elements(*CommentPage.costumer_order)[1].click()
        # 5. 评价物流服务质量
        driver.find_elements(*CommentPage.logistics_order)[2].click()
        # 6. 输入评价内容
        driver.find_element(*CommentPage.comment_text).click()
        sleep(3)
        # 7. 点击提交按钮
        driver.find_element(*CommentPage.submit).click()
        sleep(2)




